package com.chuanyang.driverh.mainhome.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.chuanyang.driverh.R;
import com.chuanyang.driverh.base.BaseListAdapter;
import com.chuanyang.driverh.response2.join.ResultDriverApplyList;


public class DriverJoinApply2Adapter extends BaseListAdapter<ResultDriverApplyList.DataBean> {
    private Context mContext;

    public DriverJoinApply2Adapter(Context context) {
        super(context);//此处不传入集合，则默认集合长度为0，在setdataresult（）方法中，添加数据并刷新
        this.mContext = context;
    }

    @Override
    public View getZkView(final int position, View convertView, final ViewGroup parent) {
        ViewHolder viewHolder = null;
        if (convertView == null) {
            convertView = getInflater().inflate(R.layout.driver_apply_item, parent, false);
            viewHolder = new ViewHolder();
            viewHolder.iv_header = (ImageView) convertView.findViewById(R.id.iv_header);

            convertView.setTag(viewHolder);
        } else {
            viewHolder = (ViewHolder) convertView.getTag();
        }
        final ResultDriverApplyList.DataBean data = getItem(position);

//        BitmapUtil.showImgForNetPath(data.getImage(), viewHolder.iv_header);
//        viewHolder.tv_driver_name.setText(data.getUsername());

        return convertView;
    }

    class ViewHolder {
        ImageView iv_header;
        TextView tv_driver_name;
        TextView tv_car_band;
        TextView tv_car_band_num;
        TextView tv_phone;
        TextView tv_get_order_num;

    }
}
